#include <iostream>
#include <algorithm>
using namespace std;

const int maxn = 1001;

int da[maxn];
int r, n;

int main()
{
	while (cin >> r >> n && n != -1) {
		for (int i = 0; i < n; ++i) cin >> da[i];
		sort(da, da + n);
		int i = 0, tot = 0, t = da[i++];
		while (i <= n) {
			while (i < n && da[i] <= t + r) ++i;
			int p = da[i - 1];
			++tot;
			while (i < n && da[i] <= p + r) ++i;
			t = da[i++];
		}
		cout << tot << endl;
	}
	return 0;
}
